<?php /* Smarty version 2.6.18, created on 2016-12-19 19:17:20
         compiled from login/index.tpl */ ?>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>管理员登录</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>[title]</title>

    <!-- Bootstrap core CSS -->
    <link href="<?php echo $this->_tpl_vars['res']; ?>
/css/bootstrap.css" rel="stylesheet">

    <!-- Add custom CSS here -->
    <link href="<?php echo $this->_tpl_vars['res']; ?>
/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo $this->_tpl_vars['res']; ?>
/font-awesome/css/font-awesome.min.css">
    <link href="<?php echo $this->_tpl_vars['res']; ?>
/css/login.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <h1>管理员登录</h1>

            <form action="<?php echo $this->_tpl_vars['url']; ?>
/prologin" method="post">
                <div class="form-group">
                    <label for="exampleInputUser">用户名</label>
                    <input type="text" name="username" class="form-control" id="exampleInputUser" placeholder="用户名">
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword">密码</label>
                    <input type="password" name="userpwd" class="form-control" id="exampleInputPassword" placeholder="密码">
                </div>
                <div class="form-group">
                    <label for="exampleInputCode">验证码</label>
                    <div class="row">
                        <div class="col-md-8">
                            <input type="text"  name="code" onkeyup="if (this.value != this.value.toUpperCase()) this.value=this.value.toUpperCase();" class="form-control" id="exampleInputCode" placeholder="验证码">
                        </div>
                        <div class="col-md-4">
                            <a href="javascript:void(0)"><img class="verify" src="<?php echo $this->_tpl_vars['url']; ?>
/code" alt="点击刷新"/></a>
                        </div>
                    </div>
                </div>
                <button type="submit" class="btn btn-default">登&nbsp;&nbsp;录</button>
            </form>
        </div>
    </div>
</div>
<script src="<?php echo $this->_tpl_vars['res']; ?>
/js/jquery-1.10.2.js"></script>
<script>
    $(function(){
        $(".verify").click(function(){
            var src = "<?php echo $this->_tpl_vars['url']; ?>
/code/";
            var random = Math.random();
            $(this).attr("src",src+random);

        });
    })
</script>
</body>
</html>